package com.jkxy.action;

import java.io.File;
import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;
import com.jkxy.service.ICatalogService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class flowerAction extends ActionSupport{
	private ICatalogService catalogService;
	
	public ICatalogService getCatalogService(){
		return catalogService;
	}
	
	public void setCatalogService(ICatalogService catalogService){
		this.catalogService=catalogService;
	}
	
	public String browseCatalog() throws Exception{
		List catalogs=catalogService.getAllCatalogs();
		Map request=(Map) ActionContext.getContext().get("request");
		request.put("catalogs", catalogs);
		return SUCCESS;
	}

}
